package com.itheima.dao;

import com.itheima.pojo.QueryVO;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    List<User> selectAll();
    List<User> selectLikeCondition1(String username);
    List<User> selectLikeCondition2(String username);
    List<User> selectLikeCondition3(String username);
    List<User> findByPage1(Integer startIndex,Integer pageSize);
    List<User> findByPage2(@Param("startIndex") Integer startIndex,@Param("pageSize") Integer pageSize);
    List<User> findByQueryVO(QueryVO queryVO);
    List<User> findByMap(Map<String,Object> map);
    int insert1(User user);
    int insert2(User user);
    List<User> selectTopN(@Param("n") Integer n);
    List<User> selectByUserNameAndSex(@Param("userName") String userName,@Param("sex") String sex);
    int updateByIdSelective(User user);
    int insertRecords(@Param("users") List<User> users);
    int deleteByIds(@Param("ids") Integer[] ids);
    List<User> selectByCondition(@Param("condition") String condition);
    int countByCondition(@Param("condition") String condition);
}
